<?php

namespace App;

use Illuminate\Database\Eloquent\Model;

/**
 * App\BrokerLevel
 *
 * @property int $id
 * @property string|null $level_name
 * @property \Illuminate\Support\Carbon|null $created_at
 * @property \Illuminate\Support\Carbon|null $updated_at
 * @method static \Illuminate\Database\Eloquent\Builder|\App\BrokerLevel whereCreatedAt($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\BrokerLevel whereId($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\BrokerLevel whereLevelName($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\BrokerLevel whereUpdatedAt($value)
 * @mixin \Eloquent
 */
class BrokerLevel extends Model
{
    protected $table='broker_level';

    public static function getSelectOptions()
    {
        $options = \DB::table('broker_level')->select('id','level_name as text')->get();
        $selectOption = [];
        foreach ($options as $option){
            $selectOption[$option->id] = $option->text;
        }
        return $selectOption;
    }
}
